package com.hgxd.service;

import com.hgxd.entity.pojo.SlaveHistory;
import com.baomidou.mybatisplus.extension.service.IService;
import com.hgxd.entity.res.ResQOQAnalysis;
import com.hgxd.entity.res.TotalElectricalEnergy;
import com.hgxd.entity.vo.*;
import com.hgxd.entity.res.ResYOYAnalysis;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 从机变量记录表 服务类
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
public interface ISlaveHistoryService extends IService<SlaveHistory> {
    /**
     * 按日期查询汇总数据
     * @param slaveHistoyVo
     * @return
     */
    List<SlaveHistoryMsgVo> getSlaveHistoryInfo(SlaveHistoryVo slaveHistoryVo);

    /**
     * 获取同比及相关数据
     * @param yoyVo
     * @return
     */
    List<ResYOYAnalysis> getYOY(YOYVo yoyVo);

    /**
     * 获取环比及相关数据
     * @param qoqVo
     * @return
     */
    List<ResQOQAnalysis> getQOQ(QOQVo qoqVo);

    /**
     * 获取总电量历史
     * @return
     */
    HashMap<LocalDate, Integer> getTotalElectricityHistory();

    /**
     * 电能集抄
     * @param totalElectricalEnergyVo
     * @return
     */
    List<TotalElectricalEnergy> getElectricalEnergy(ResTotalElectricalEnergyVo totalElectricalEnergyVo);

    /**
     * 查询某天每小时某配电室总电能
     * @param beginTime
     * @param endingTime
     * @param slaveIds
     * @return
     */
    Map<Integer, Double> getTotalEnergyByHour(LocalDateTime beginTime, LocalDateTime endingTime, Integer slaveId);
}
